﻿using System.Collections.Generic;

namespace HCQ2_Model.DocModel
{
    /// <summary>
    ///  文档结构模型
    /// </summary>
    public class DocTreeModel
    {
        /// <summary>
        ///  店铺商品排序方式
        /// </summary>
        public int sortType { get; set; }
        /// <summary>
        ///  城市
        /// </summary>
        public string city { get; set; }
        /// <summary>
        ///  地址
        /// </summary>
        public string addr { get; set; }
        public string bs_url { get; set; }
        /// <summary>
        ///  楼层列表
        /// </summary>
        public string floor_level { get; set; }
        /// <summary>
        ///  启用合伙人
        /// </summary>
        public bool statr_partner { get; set; }
        /// <summary>
        ///  经度
        /// </summary>
        public decimal? gps_x { get; set; }
        /// <summary>
        ///  纬度
        /// </summary>
        public decimal? gps_y { get; set; }
        /// <summary>
        ///  服务类别
        /// </summary>
        public string bs_type { get; set; }
        /// <summary>
        ///  创世人登录名
        /// </summary>
        public string founder_login { get; set; }
        /// <summary>
        ///  合伙人登录名
        /// </summary>
        public string founder_name { get; set; }
        /// <summary>
        ///  合伙人id
        /// </summary>
        public int founder_id { get; set; }
        /// <summary>
        ///  是否共享
        /// </summary>
        public int is_share { get; set; }
        /// <summary>
        ///  正确率
        /// </summary>
        public int accuracy { get; set; }
        /// <summary>
        ///  学习人数
        /// </summary>
        public int learn_num { get; set; }
        /// <summary>
        ///  题目数
        /// </summary>
        public int topic_num { get; set; }
        /// <summary>
        ///  正确数
        /// </summary>
        public int result_ok { get; set; }
        /// <summary>
        ///  错误数
        /// </summary>
        public int result_error { get; set; }

        /// <summary>
        ///  层级
        /// </summary>
        public int ply { get; set; }
        /// <summary>
        ///  是否推荐
        /// </summary>
        public bool is_recommend { get; set; }
        /// <summary>
        ///  是否推荐
        /// </summary>
        public int re_folder { get; set; }
        /// <summary>
        ///  素材格式
        /// </summary>
        public string materType { get; set; }
        /// <summary>
        ///  是否需要权限验证
        ///  true：需要权限验证
        ///  false：无需权限验证
        /// </summary>
        public bool if_limit { get; set; } = true;
        /// <summary>
        ///  是否私有属性
        ///  false：公开
        ///  true：私有
        /// </summary>
        public bool if_private { get; set; } = false;
        /// <summary>
        ///  分组名称
        /// </summary>
        public string group_name { get; set; }
        public int folder_order { get; set; } = 0;
        /// <summary>
        ///  所属单位
        /// </summary>
        public string unit_code { get; set; }
        /// <summary>
        ///  folder_id
        /// </summary>
        public int id { get; set; }
        /// <summary>
        ///  目录名
        /// </summary>
        public string name { get; set; }
        /// <summary>
        ///  英文名
        /// </summary>
        public string enLang { get; set; }
        /// <summary>
        ///  语言唯一码
        /// </summary>
        public string langCode { get; set; }
        /// <summary>
        ///  父目录ID
        /// </summary>
        public int pId { get; set; }
        /// <summary>
        ///  父目录名称
        /// </summary>
        public string pName { get; set; }
        /// <summary>
        ///  父目录path
        /// </summary>
        public string pPath { get; set; }
        /// <summary>
        ///  是否只读
        /// </summary>
        public bool read_only { get; set; }
        /// <summary>
        ///  是否允许创建子目录
        /// </summary>
        public bool if_create_child { get; set; }
        /// <summary>
        ///  是否能被分享到此目录
        /// </summary>
        public bool was_share { get; set; }
        /// <summary>
        ///  是否属于系统字典
        /// </summary>
        public bool if_sys { get; set; }
        /// <summary>
        ///  折叠状态
        /// </summary>
        public bool open { get; set; } = false;
        /// <summary>
        ///  节点类型
        ///  0：仅自己
        ///  1：分享
        ///  2：公用
        /// </summary>
        public int doc_type { get; set; }
        /// <summary>
        ///  页面类型
        ///  
        /// </summary>
        public string pageType { get; set; }
        /// <summary>
        ///  path
        /// </summary>
        public string folder_path { get; set; }
        /// <summary>
        ///  图标地址
        /// </summary>
        public string folder_url { get; set; }
        /// <summary>
        ///  备注
        /// </summary>
        public string folder_note { get; set; } = "";
        /// <summary>
        /// 产品类别：字典value
        /// </summary>
        public int pro_type { get; set; }
        /// <summary>
        ///  产品类别：字典text
        /// </summary>
        public string proType { get; set; }
        /// <summary>
        ///  子目录数据
        /// </summary>
        public List<DocTreeModel> children { get; set; }
    }
    public class TreeDataStatistics
    {
        /// <summary>
        ///  目录id
        /// </summary>
        public int folder_id { get; set; }
        /// <summary>
        ///  父id
        /// </summary>
        public int folder_pid { get; set; }
        /// <summary>
        ///  正确率
        /// </summary>
        public int accuracy { get; set; }
        /// <summary>
        ///  学习人数
        /// </summary>
        public int learn_num { get; set; }
        /// <summary>
        ///  题目数
        /// </summary>
        public int topic_num { get; set; }
        /// <summary>
        ///  正确数
        /// </summary>
        public int result_ok { get; set; }
        /// <summary>
        ///  错误数
        /// </summary>
        public int result_error { get; set; }
    }
    public class TreeDataStatisticsNode: TreeDataStatistics
    {
        /// <summary>
        ///  子目录数据
        /// </summary>
        public List<TreeDataStatisticsNode> children { get; set; }
    }
    //VR客户端指定需要的返回字段
    public class VRClientTreeModel
    {
        /// <summary>
        ///  城市
        /// </summary>
        public string city { get; set; }
        /// <summary>
        ///  地址
        /// </summary>
        public string addr { get; set; }
        /// <summary>
        ///  楼层列表以逗号分割
        /// </summary>
        public string floor_level { get; set; }
        /// <summary>
        ///  是否启用合伙人
        /// </summary>
        public bool statr_partner { get; set; }
        /// <summary>
        ///  创始人手机号
        /// </summary>
        public string founder_phone { get; set; }
        /// <summary>
        ///  距离
        /// </summary>
        public int sense { get; set; }
        /// <summary>
        ///  经度
        /// </summary>
        public decimal? gps_x { get; set; }
        /// <summary>
        ///  纬度
        /// </summary>
        public decimal? gps_y { get; set; }
        /// <summary>
        ///  服务类型
        /// </summary>
        public string bs_type { get; set; }
        /// <summary>
        ///  店铺地址
        /// </summary>
        public string bs_url { get; set; }
        /// <summary>
        ///  合伙人协议内容
        /// </summary>
        public string deal_note { get; set; }
        /// <summary>
        ///  创始人名
        /// </summary>
        public string founder_name { get; set; }
        /// <summary>
        ///  创始人id
        /// </summary>
        public int founder_id { get; set; }
        /// <summary>
        ///  创建人
        /// </summary>
        public string create_name { get; set; }
        /// <summary>
        ///  创建时间
        /// </summary>
        public string create_date { get; set; }
        /// <summary>
        ///  更新人
        /// </summary>
        public string update_name { get; set; }
        /// <summary>
        ///  更新时间
        /// </summary>
        public string update_date { get; set; }
        /// <summary>
        ///  是否点赞
        /// </summary>
        public bool isStar { get; set; }
        /// <summary>
        ///  导航树：点赞次数
        /// </summary>
        public int star_num { get; set; }
        /// <summary>
        ///  导航树：收藏次数
        /// </summary>
        public int focus_num { get; set; }
        /// <summary>
        ///  是否收藏
        ///  1：已收藏
        ///  0：未收藏
        /// </summary>
        public int favorite { get; set; }
        /// <summary>
        ///  是否收藏
        /// </summary>
        public bool isFavorite { get; set; }
        /// <summary>
        ///  是否全员共享
        /// </summary>
        public int is_share { get; set; }
        /// <summary>
        ///  正确率
        /// </summary>
        public int accuracy { get; set; }
        /// <summary>
        ///  学习人数
        /// </summary>
        public int learn_num { get; set; }
        /// <summary>
        ///  题目数
        /// </summary>
        public int topic_num { get; set; }
        /// <summary>
        ///  正确数
        /// </summary>
        public int result_ok { get; set; }
        /// <summary>
        ///  错误数
        /// </summary>
        public int result_error { get; set; }

        /// <summary>
        ///  层级
        /// </summary>
        public int ply { get; set; }
        /// <summary>
        ///  是否推荐
        /// </summary>
        public bool is_recommend { get; set; }
        /// <summary>
        ///  是否推荐
        /// </summary>
        public int re_folder { get; set; }
        /// <summary>
        ///  素材格式
        /// </summary>
        public string materType { get; set; }
        /// <summary>
        ///  是否私有属性
        ///  0：公开
        ///  1：私有
        /// </summary>
        public int if_private { get; set; }
        /// <summary>
        ///  分组名称
        /// </summary>
        public string group_name { get; set; }
        public int folder_order { get; set; } = 0;
        /// <summary>
        ///  所属单位
        /// </summary>
        public string unit_code { get; set; }
        /// <summary>
        ///  folder_id
        /// </summary>
        public int id { get; set; }
        /// <summary>
        ///  目录名
        /// </summary>
        public string name { get; set; }
        /// <summary>
        ///  英文名
        /// </summary>
        public string enLang { get; set; }
        /// <summary>
        ///  父目录ID
        /// </summary>
        public int pId { get; set; }
        /// <summary>
        ///  是否只读
        /// </summary>
        public bool read_only { get; set; }
        /// <summary>
        ///  path
        /// </summary>
        public string folder_path { get; set; }
        /// <summary>
        ///  图标地址
        /// </summary>
        public string folder_url { get; set; }
        /// <summary>
        ///  备注
        /// </summary>
        public string folder_note { get; set; } = "";
        /// <summary>
        /// 产品类别：字典value
        /// </summary>
        public int pro_type { get; set; }
        /// <summary>
        ///  产品类别：字典text
        /// </summary>
        public string proType { get; set; }
        /// <summary>
        ///  子目录数据
        /// </summary>
        public List<VRClientTreeModel> children { get; set; }
    }
}